function stop(){
	return false;
}
document.oncontextmenu=stop;

layui.config({
    //base: getCtx()+'/static/admin/js/modules/'
    base: '/static/admin/js/modules/'
}).extend({
    sidebar: 'sidebar',
    treeGrid: 'treeGrid',
    iconPicker: 'iconPicker',
    formSelects: 'formSelects-v4.min',
    treeSelect: 'treeSelect',
    autocomplete: 'autocomplete',
    mouseRightMenu: 'mouseRightMenu',
});

function getCtx() {
    var pathName = window.location.pathname.substring(1);
    var webName = pathName == '' ? '' : pathName.substring(0, pathName
        .indexOf('/'));
    //return window.location.protocol + '//' + window.location.host + '/' + webName;
    var ctx = '';
    if (webName == "" || webName == "sys") {
    	ctx = window.location.protocol + '//' + window.location.host;
    } else {
    	ctx = window.location.protocol + '//' + window.location.host + '/'
            + webName;
    }
    return ctx;
}

function downFileByIframe(downloadURL) {
    var iframe = document.createElement("iframe");
    iframe.src = downloadURL;
    iframe.style.display = "none";
    document.body.appendChild(iframe);
}
